package com.tensquare.recruit.dao;

import com.tensquare.recruit.pojo.Enterprise;
import com.tensquare.recruit.pojo.Recruit;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * @Author: Feng.Wang
 * @Company: Zelin.ShenZhen
 * @Description:
 * @Date: Create in 2019/3/23 15:57
 */
public interface RecruitDao extends JpaRepository<Recruit,String>, JpaSpecificationExecutor<Recruit> {
    /**
     * 查询状态为2并以创建日期降序排序，查询前4条
     */
    public List<Recruit> findTop4ByStateOrderByCreatetimeDesc(String state);
    /**
     * 查询状态不为0并以创建日期降序排序，查询前12条
     */
    public List<Recruit> findTop12ByStateNotOrderByCreatetimeDesc(String state);
}
